import java.util.*;

public class _2023_10_12 {
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] dp = new int[n + 1][m + 1];
        for(int i = 0; i < m + 1; i++){
            dp[0][i] = 1;
        }
        for(int j = 0; j < n + 1; j++){
            dp[j][0] = 1;
        }
        for(int i = 1; i < n + 1; i++){
            for(int j = 1; j < m + 1; j++){
                dp[i][j] = dp[i - 1][j] + dp[i][j - 1];
            }
        }
        System.out.println(dp[n][m]);
    }

}
